


/*
 * oled.h
 *
 *  Created on: 2022锟斤拷7锟斤拷2锟斤拷
 *      Author: 锟斤拷锟
 */

#ifndef MAIN_OLED_H_
#define MAIN_OLED_H_


//////////////////////////////////////////////////////////////////////////////////
//  锟斤拷锟斤拷锟斤拷锟斤拷   : OLED 4锟接匡拷锟斤拷示锟斤拷锟斤拷(51系锟斤拷)
//              说锟斤拷:
//              ----------------------------------------------------------------
//              GND
//              VCC  	3.3v
//              D0    	CLK
//              D1    	DIN
//              RES  	RES
//              DC      DC
//              CS      CS
//              ----------------------------------------------------------------
//******************************************************************************/
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "u8g2.h"
#include "u8x8.h"
#include "stdlib.h"
#include "driver/gpio.h"
#include "driver/spi_master.h"
#define u8 unsigned char
#define u32 unsigned int


#define u8         unsigned char  // ?unsigned char ????
#define MAX_LEN    128  //
#define OLED_ADDRESS  0x3C // oled
#define OLED_CMD   0x00  //
#define OLED_DATA  0x40  //

/* USER CODE BEGIN Prototypes */
uint8_t u8x8_byte_hw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_gpio_and_delay(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
void u8g2Init(u8g2_t *u8g2a);
void draw(u8g2_t *u8g2);
void testDrawPixelToFillScreen(u8g2_t *u8g2);


#endif /* MAIN_OLED_H_ */




